<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:cc="http://xmlns.jcp.org/jsf/composite"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">

    <!-- INTERFACE -->
    <cc:interface>
        
    </cc:interface>

    <!-- IMPLEMENTATION -->
    <cc:implementation>
        <h:form id="content">  
            <p:commandButton id="optionsButton" value="Option" type="button"/>
            <p:menu  id="option-menu" overlay="true" trigger="optionsButton" my="right top" at="right bottom">
                <p:submenu label="Profile">
                    <p:menuitem value="Edit" action="#{profile.edit}" update="@all"/>
                    <p:menuitem value="Remove Account" action="#{profile.unRegistration}" update="@all"/>
                </p:submenu>
                <p:submenu label="Calendar">
                    <p:menuitem value="Set Visibility" action="#{profile.setVisibility}" update="@all"/>
                    <p:menuitem value="Export" action="#{profile.exportCalendar}" update="@all"/>
                    <p:menuitem value="Import" action="#{profile.importCalendar}" update="@all"/>
                </p:submenu>
                <p:menuitem value="Home" action="#{profile.userHome()}" update="@all"/>
            </p:menu>
            <p:commandButton id="logout" value="logout" action="#{userHome.logout}" ajax="true" update="@all"  type="Button"/>
            
        </h:form>
    </cc:implementation>
</html>